import TodoList from '../todoList/todoListContainer.js'
import ArticleLists from '../article/articleContainer.js'
import ArticleDetail from '../articleDetail/articleContainer.js'
import ArticleEditorContainer from '../articlePublish/container.js'
import About from '../about/about.js'
import Slucky from '../slucky/slucky.js'
import Cover from '../app/cover.js'
import App from '../app/app.js'
import keepOnline from '../lib/user.js'
import RegisterContainer from '../register/container.js'
import {
	pushInQueue
} from '../message/action.js'
import React from 'react'
import ReactDOM from 'react-dom'
import {
	Router,
	Route,
	IndexRoute,
	hashHistory,
	browserHistory
} from 'react-router'

export default (
	<Route path="/" component={App}>
		<IndexRoute component={Cover}/>
		<Route onEnter={dispatch=>dispatch(keepOnline())} path="/todoList" component={TodoList}/>
		<Route onEnter={dispatch=>dispatch(keepOnline())} path="/article" component={ArticleLists}/>
		<Route onEnter={dispatch=>dispatch(keepOnline())} path="/article/:id" component={ArticleDetail}/>
		<Route onEnter={dispatch=>dispatch(keepOnline())} path="/edit" component={ArticleEditorContainer}/>
		<Route onEnter={dispatch=>dispatch(keepOnline())} path="/slucky" component={Slucky}/>
		<Route onEnter={dispatch=>dispatch(keepOnline())} path="/about" component={About}/>
		<Route onEnter={dispatch=>dispatch(keepOnline())} path="/register" component={RegisterContainer}/>
	</Route>
)